import request from '@/utils/request'

// 查询分红列表
export function listDividend(query) {
  return request({
    url: '/publish/dividend/list',
    method: 'get',
    params: query
  })
}

// 查询我的分红列表
export function myListDividend(query) {
  return request({
    url: '/publish/dividend/myList',
    method: 'get',
    params: query
  })
}

// 查询分红详细
export function getDividend(id) {
  return request({
    url: '/publish/dividend/' + id,
    method: 'get'
  })
}

// 新增分红
export function addDividend(data) {
  return request({
    url: '/publish/dividend',
    method: 'post',
    data: data
  })
}

// 修改分红
export function updateDividend(data) {
  return request({
    url: '/publish/dividend',
    method: 'put',
    data: data
  })
}

// 删除分红
export function delDividend(id) {
  return request({
    url: '/publish/dividend/' + id,
    method: 'delete'
  })
}

// 导出分红
export function exportDividend(query) {
  return request({
    url: '/publish/dividend/export',
    method: 'get',
    params: query
  })
}
